package com.ssyt.yt1.day9.homework.singleton;

import java.io.IOException;

/**
 * Runtime类是单例设计的典型例子:操作cmd
 * 
 * @author Administrator
 *
 */
public class RuntimeDemo {

	public static void main(String[] args) throws IOException,
			InterruptedException {
		// Runtime类是单例设计的典型例子
		Runtime runtime = Runtime.getRuntime();
		// 调取画图板
		Process process = runtime.exec("mspaint");
		// 程序睡眠5000钟
		Thread.sleep(5000);
		// 结束进程
		process.destroy();
	}
}
